// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import 'babel-polyfill'
import Es6Promise from 'es6-promise'
require('es6-promise').polyfill()
Es6Promise.polyfill()

Vue.config.productionTip = false

Vue.use(ElementUI)
// vue-resource
// 在服务器通讯方面，在升级到 vue 2.0 后，官方已经取消对 vue-resource 的更新而是转推 Axios
// import VueResource from 'vue-resource'
// Vue.use(VueResource)

// 将全局样式文件写在 main.js
import '@/assets/scss/reset.scss'
// import '@/assets/scss/iconfont.scss'
// 统一图标样式 https://icomoon.io/app/#/select/font
import '@/assets/style.css'
import '../static/css/icons-extra.css'
import '../static/css/mui.css'
// animate
import animate from 'animate.css'
Vue.use(animate)
// 全局引入 mui.js。然而并没有全局引用
/* import '../static/js/mui' */
/* import '../static/js/swiper' */
// Mint UI
import Mint from 'mint-ui'
import '../static/css/mint-ui.css'
Vue.use(Mint)

// 图片懒加载
import VueLazyload from 'vue-lazyload'
Vue.use(VueLazyload, {
  loading: require('static/loading-bars.svg'),
  // loading: require('@/assets/img/logo.png')
})

// 高德地图
import AMap from 'vue-amap'
Vue.use(AMap)
// 初始化vue-amap
AMap.initAMapApiLoader({
  // 高德key
  key: 'f506ad547ede151796861956bbbc064b',
  // 插件集合 （插件按需引入）
  plugin: ['AMap.ToolBar', 'AMap.ElasticMarker', 'AMap.AdvancedInfoWindow', 'AMap.Driving'],
  v: '1.4.4'
})
// 定义全局加载组件
import {Vwaiting, Cwaiting} from 'static/js/showWating.js'
window.app = Object.assign({}, {Vwaiting, Cwaiting})

import VueQuillEditor from 'vue-quill-editor'
// require styles
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

Vue.use(VueQuillEditor, /* { default global options } */ )
// md5 import md5 from 'js-md5';
// base64 let Base64 = require('js-base64').Base64;

/* import VueTextareaAutosize from 'vue-textarea-autosize'
Vue.use(VueTextareaAutosize) */

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: { App }
})
